﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/Main.cshtml";
}
@model Forum.Web.Models.HomeModel
@using Forum.Web.BaseCode
@using Forum.Entity.Board
@section head
{
    @Html.Raw(ForumStyle.Index)
}

<div class="sumber">
    今日: 240<span>|</span>昨日: 460<span>|</span>帖子: 124417<span>|</span>会员: 33544<span>|</span>欢迎新会员:<a
        href="#">张三</a></div>
<div class="main">
    <div class="main_list">
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            @foreach (ForumBoardInfo info in this.Model.Boards.Where(T => T.Depth == 1))
            {                        
                <tr class="title">
                    <td colspan="4" class="tit">
                        <a href="javascript:;">
                            @info.Name</a>
                    </td>
                    <td class="but">
                        <a href="#">
                            <img src='@(ForumPath.Image + "collapsed_no.gif")' title="收起/展开" alt="收起/展开" /></a>
                    </td>
                </tr>
                foreach (ForumBoardInfo sub in this.Model.Boards.Where(T => T.UpperID == info.ID))
                { 
                <tr class="@((sub == this.Model.Boards.Last()) ? "last" : "line")">
                    <td class="pic" align="center">
                        <a href='@(ForumPath.VirtualRoot + "topic/list/" + sub.ID)'>
                            <img src='@(ForumPath.Image + "forum" + (sub.TodayPosts > 0 ? "_new" : "") + ".gif")' alt='@sub.Name' /></a>
                    </td>
                    <td class="con">
                        <p>
                            <a style="font-weight: bold; color: #333;" href='@(ForumPath.VirtualRoot + "topic/list/" + sub.ID)'>
                                @sub.Name</a>
                            @Html.Raw(sub.TodayPosts > 0 ? "<span>(" + sub.TodayPosts + ")</span>" : "")</p>
                        <p>
                            @sub.Remark</p>
                        @Html.Raw(sub.Moderator == "" ? "" : "<p>版主: <a href='javascript:;'>" + sub.Moderator + "</a></p>")
                    </td>
                    <td class="num">
                        <span>
                            @sub.Topics</span> / @sub.Posts
                    </td>
                    <td class="sum">
                        @if (sub.LastMemberID != null)
                        {
                            <p>
                                <a href='@(ForumPath.VirtualRoot + "Topic/Detail/" + sub.LastTopicID)'>
                                    @sub.LastTopicName</a>
                            </p>
                            <p>
                                @sub.LastPostTime.Value.ToString("yyyy-MM-dd hh:mm")
                                &nbsp;<a href="javasript:;">@sub.LastMemberName</a></p>
                        }
                        else
                        { 
                            @:从未
                        }
                    </td>
                    <td class="but">
                    </td>
                </tr>
                }
            }
        </table>
    </div>
    <div class="main_content">
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr class="title">
                <td colspan="5" class="tit">
                    <a href="#">在线会员 - 197 人在线 - 21 会员(0 隐身), 176 位游客 - 最高记录是 452 于 2011-4-6.</a>
                </td>
                <td class="but">
                    <a href="#">
                        <img src="@(ForumPath.Image + "collapsed_no.gif")" /></a>
                </td>
            </tr>
            <tr>
                <td valign="middle" colspan="6">
                    <div class="con">
                        <img src="@(ForumPath.Image + "online_admin.gif")" />特聘管理员
                        <img src="@(ForumPath.Image + "online_supermod.gif")" />超级版主
                        <img src="@(ForumPath.Image + "online_moderator.gif")" />版主
                        <img src="@(ForumPath.Image + "online_member.gif")" />会员</div>
                </td>
            </tr>
            <tr>
                <td>
                    <ul>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">Feendodakygok</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">kaatj6727</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">曹可凡</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">聂嘉兴</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">陈奕龙</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">Feendodakygok</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">kaatj6727</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">曹可凡</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">聂嘉兴</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">陈奕龙</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">Feendodakygok</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">kaatj6727</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">曹可凡</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">聂嘉兴</a></li>
                        <li>
                            <img src="@(ForumPath.Image + "online_member.gif")" /><a href="#">陈奕龙</a></li>
                    </ul>
                </td>
            </tr>
        </table>
    </div>
</div>
